<?php

namespace app\api\controller\v1;

use app\api\validate\IDMustBePostiveInt;
use  app\api\model\Banner as BannerModel;
use app\lib\exception\BannerMissException;

class Banner
{
    /*
     *
     * @id banner的id号
     * @url /banner/:id
     * @id banner的id号
     * */

    public function getBanner($id)
    {
        (new IDMustBePostiveInt())->goCheck();
//        $result =  BannerModel::get($id);
         $result =  BannerModel::getBannerById($id);
//         if ($result){
//            throw  (new BannerMissException());
//         }
        return $result;
    }
}








































